﻿@using GTAuto.Site.BackEnd.ApCode.Helpers.Html
@using GTAuto.Site.BackEnd.AppCode.Helpers.Html
@model List<GTAuto.DAL.Entities.GTAd>
@{
    ViewBag.Title = "NewAds";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h4 class="alert_info">
    Неактивные объявления</h4>
<div class="clear">
</div>
<article class="module width_full">
    <header><h3 class="tabs_involved">Категории</h3>
    
    </header>

    <div class="tab_container">
        <div id="tab1" class="tab_content">
            <table class="tablesorter" cellspacing="0"> 
                <thead> 
                    <tr>
                        <th style="text-align: left">Id</th>  
                        <th style="text-align: left">Название</th> 
                        <th style="text-align: left">Родителская категория</th> 
                        <th></th> 
                        <th></th> 
                    </tr> 
                </thead> 
                <tbody>
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td>@item.Id</td> 
                            <td>@item.Name</td>
                            <td>@item.AdCategory.Name</td>
                            
                            <td><a href=@Url.Content("~/Ads/AdsView/" + item.Id) class="edit">Ред.</a></td> 

                            <td><a href=@Url.Content("~/Ads/AdsDelete/" + item.Id) class="delete" onclick="if (!confirm('Вы уверены ?')) return  false;" >Удалить</a></td> 
                        </tr>
                    }
			
                </tbody> 
            </table>
        </div><!-- end of #tab1 -->
					
        @if (((int)ViewBag.CountForPage) < ((int)ViewBag.TotalCount))
        {
            <div class="pager right">
                @Html.NoAcAdsPager((int)ViewBag.CountForPage, (int)ViewBag.CurrentPage, (int)ViewBag.TotalCount)
            </div>
        }
    </div><!-- end of .tab_container -->
		
</article>
<div class="clear">
</div>
